import { Body, Controller, Post } from '@nestjs/common'
import { AssetsService } from './assets.service'

@Controller('assets')
export class AssetsController {
  constructor(private readonly assetsService: AssetsService) { }
  @Post('page')
  page(@Body() body) {
    return this.assetsService.getPageList(body)
  }

  // 首页获取tag数据
  @Post('getHomeTag')
  getHomeTag(@Body() body) {
    return this.assetsService.getHomeTag(body)
  }

  // 获取部门各类型资产总数
  @Post('getCountOfType')
  getCountOfType(@Body() body) {
    return this.assetsService.getCountOfType(body)
  }

  // 获取部门各类型申请总数
  @Post('getReceiveCount')
  getReceiveCount(@Body() body) {
    return this.assetsService.getReceiveCount(body)
  }

  // 资产预警
  @Post('assetWarning')
  assetWarning(@Body() body) {
    return this.assetsService.assetWarning(body)
  }
}
